package com.th.supcom.pds.impl.manager.impl;

import java.util.List;
import java.util.Map;

import net.carefx.fc.framework.db.manager.GetSequenceHelper;

import org.apache.ibatis.session.RowBounds;

import com.th.supcom.pds.domain.pojo.PdsPresc;
import com.th.supcom.pds.domain.pojo.PdsPrescCombine;
import com.th.supcom.pds.domain.pojo.PdsPrescDispenseWindow;
import com.th.supcom.pds.domain.vo.PdsPrescParametersVO;
import com.th.supcom.pds.domain.vo.PdsPrescVO;
import com.th.supcom.pds.impl.dao.PdsPrescMapper;
import com.th.supcom.pds.impl.manager.PdsPrescManager;

/**
 * PdsPresc 管理接口实现.
 * 
 * 处方主记录.
 */
public class PdsPrescManagerImpl implements PdsPrescManager
{
    public static final String TAB_PDS_PRESC = "PDS_PRESC";

    private PdsPrescMapper m_pdsPrescMapper;

    /** 序列生成器. */
    private GetSequenceHelper m_getSequenceHelper;

    /**
     * 默认的构造函数.
     */
    public PdsPrescManagerImpl ()
    {

    }

    /**
     * 获取PdsPrescMapper.
     * 
     * @return PdsPrescMapper.
     */
    public PdsPrescMapper getPdsPrescMapper ()
    {
        return m_pdsPrescMapper;
    }

    /**
     * 注入PdsPrescMapper.
     * 
     * @param pdsPrescMapper set pdsPrescMapper.
     */
    public void setPdsPrescMapper (PdsPrescMapper pdsPrescMapper)
    {
        m_pdsPrescMapper = pdsPrescMapper;
    }

    /**
     * 获取序列.
     * 
     * @return GetSequenceHelper
     */
    public GetSequenceHelper getGetSequenceHelper ()
    {
        return m_getSequenceHelper;
    }

    /**
     * 注入序列.
     * 
     * @param getSequenceHelper getSequenceHelper.
     */

    public void setGetSequenceHelper (GetSequenceHelper getSequenceHelper)
    {
        m_getSequenceHelper = getSequenceHelper;
    }

    /**
     * 通过给凭证号查询处方号
     * 
     * @param RcptNo 凭证号
     * @return 处方号的list
     */
    public List <String> getPrescNoByRcptNo (String rcptNo)
    {
        return m_pdsPrescMapper.getPrescNoByRcptNo (rcptNo);
    }

    @Override
    public PdsPresc getPdsPrescByID (String id)
    {
        return m_pdsPrescMapper.getPdsPrescByID (id);
    }

    @Override
    public List <PdsPrescVO> queryPresc (PdsPrescParametersVO pdsPrescParametersVO)
    {
        return m_pdsPrescMapper.queryPrescByPrescNoOrPVID (pdsPrescParametersVO);
    }

    @Override
    public Long getPdsPrescSeq ()
    {
        return m_getSequenceHelper.getNextSequenceId (TAB_PDS_PRESC);
    }

    @Override
    public List <PdsPresc> findPdsPrescListByExample (PdsPresc pdsPresc)
    {
        return m_pdsPrescMapper.findPdsPrescListByExample (pdsPresc);
    }

    @Override
    public int findPdsPrescCountByExample (PdsPresc pdsPresc)
    {
        return m_pdsPrescMapper.findPdsPrescCountByExample (pdsPresc);
    }

    @Override
    public List <PdsPresc> findPdsPrescListByMap (Map <String, Object> params)
    {
        return m_pdsPrescMapper.findPdsPrescListByMap (params);
    }

    @Override
    public List <PdsPresc> findPdsPrescListWithPageByMap (Map <String, Object> params, Integer offset, Integer limit)
    {
        return m_pdsPrescMapper.findPdsPrescListWithPageByMap (new RowBounds (offset, limit), params);
    }

    @Override
    public Integer findPdsPrescCountByMap (Map <String, Object> params)
    {
        return m_pdsPrescMapper.findPdsPrescCountByMap (params);
    }

    @Override
    public int modifyPdsPresc (PdsPresc pdsPresc)
    {
        return m_pdsPrescMapper.modifyPdsPresc (pdsPresc);
    }

    @Override
    public int modifyPdsPrescByExample (PdsPresc pdsPresc)
    {
        return m_pdsPrescMapper.modifyPdsPrescByExample (pdsPresc);
    }

    @Override
    public int removePdsPrescByID (Long id)
    {
        return m_pdsPrescMapper.removePdsPrescByID (id);
    }

    @Override
    public int removePdsPrescByMap (Map <String, Object> params)
    {
        return m_pdsPrescMapper.removePdsPrescByMap (params);
    }

    @Override
    public void addPdsPresc (PdsPresc pdsPresc)
    {
        m_pdsPrescMapper.addPdsPresc (pdsPresc);
    }

    @Override
    public List <PdsPrescCombine> findCombinePdsPrescListByExample (Map <String, Object> params)
    {
        return m_pdsPrescMapper.findCombinePdsPrescListByExample (params);
    }

    @Override
    public int findCombinePdsPrescCountByExample (PdsPrescCombine pdsPrescCombine)
    {
        return m_pdsPrescMapper.findCombinePdsPrescCountByExample (pdsPrescCombine);
    }

    @Override
    public List <PdsPrescCombine> findCombinePdsPrescListByMap (Map <String, Object> params)
    {
        return m_pdsPrescMapper.findCombinePdsPrescListByMap (params);
    }

    @Override
    public List <PdsPrescCombine> findCombinePdsPrescListWithPageByMap (Map <String, Object> params, Integer offset, Integer limit)
    {
        return m_pdsPrescMapper.findCombinePdsPrescListWithPageByMap (new RowBounds (offset, limit), params);
    }

    @Override
    public Integer findCombinePdsPrescCountByMap (Map <String, Object> params)
    {
        return m_pdsPrescMapper.findCombinePdsPrescCountByMap (params);
    }

    @Override
    public int modifyPdsPrescList (List <PdsPresc> pdsPrescs)
    {
        return m_pdsPrescMapper.modifyPdsPrescList (pdsPrescs);
    }

    @Override
    public int modifyPdsPrescListForReturn (List <PdsPresc> pdsPrescs)
    {
        return m_pdsPrescMapper.modifyPdsPrescListForReturn (pdsPrescs);
    }

    @Override
    public int modifyPdsPrescListForRefund (List <PdsPresc> pdsPrescs)
    {
        return m_pdsPrescMapper.modifyPdsPrescListForRefund (pdsPrescs);
    }

    @Override
    public List <PdsPresc> findPdsPrescListByList (List <PdsPresc> pdsPrescs)
    {
        return m_pdsPrescMapper.findPdsPrescListByList (pdsPrescs);
    }

    @Override
    public List <PdsPrescDispenseWindow> findPdsPrescWindowByMap (Map <String, Object> params)
    {
        return m_pdsPrescMapper.findPdsPrescWindowByMap (params);
    }

    @Override
    public int modifyPdsPrescWindowList (List <PdsPresc> pdsPrescs)
    {
        return m_pdsPrescMapper.modifyPdsPrescWindowList (pdsPrescs);
    }

    @Override
    public int modifyChargeIndicatorByList (List <PdsPresc> pdsPrescs)
    {
        return m_pdsPrescMapper.modifyChargeIndicatorByList (pdsPrescs);
    }

    @Override
    public List <PdsPrescCombine> findPdsPrescCombineByList (List <PdsPresc> pdsPrescs)
    {
        return m_pdsPrescMapper.findPdsPrescCombineByList (pdsPrescs);
    }

}